//
// Created by redcat1 on 12.05.2024.
//

#include "figures.h"
#include "data_generator.h"
#include <iostream>
#if defined(TEST_MODE)
  #include "test_data_generator.h" // for testing
#endif


int main()
{
  std::srand(std::time(nullptr)); // use current time as seed for random generator

#if defined(TEST_MODE)
  RunDataGeneratorTests();
#else

  Rectangle rects[100];
  RightTriangle tris[100];
  Circle circs[100];
  for (int i = 0; i < 100; i++)
  {
    rects[i] = GetRandomRectangle(); // generate random rectangle
    tris[i] = GetRandomRightTriangle(); // generate random triangle
    circs[i] = GetRandomCircle(); // generate random circle
  }

  for (int i = 0; i < 100; i++)
  {
    std::cout << "Rectangle area = " << Rectangle_Area(&rects[i]) << std::endl;
    std::cout << "Rectangle perimeter = " << Rectangle_Perimeter(&rects[i]) << std::endl;
    std::cout << "Triangle area = " << RightTriangle_Area(&tris[i]) << std::endl;
    std::cout << "Triangle perimeter = " << RightTriangle_Perimeter(&tris[i]) << std::endl;
    std::cout << "Circle area = " << Circle_Area(&circs[i]) << std::endl;
    std::cout << "Circle perimeter = " << Circle_Perimeter(&circs[i]) << std::endl << std::endl;
  }
#endif

  return 0;
}
